// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** 删除评论 GET /api/teachingComment/${param0} */
export async function deleteCommentUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteCommentUsingGETParams,
  options?: { [key: string]: any }
) {
  const { commentId: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean_>(`/api/teachingComment/${param0}`, {
    method: "GET",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 添加评论 POST /api/teachingComment/add */
export async function addCommentUsingPost(
  body: API.TeachingCommentRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/teachingComment/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取阅读评论记录状态 GET /api/teachingComment/getCommentRecordsStatus/${param0} */
export async function getTeacherRelationsUsingGet1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTeacherRelationsUsingGET1Params,
  options?: { [key: string]: any }
) {
  const { replyToUserId: param0, ...queryParams } = params;
  return request<API.BaseResponseObject_>(
    `/api/teachingComment/getCommentRecordsStatus/${param0}`,
    {
      method: "GET",
      params: { ...queryParams },
      ...(options || {}),
    }
  );
}

/** 处理阅读评论记录状态 GET /api/teachingComment/handle/${param0} */
export async function handleCommentUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.handleCommentUsingGETParams,
  options?: { [key: string]: any }
) {
  const { commentId: param0, ...queryParams } = params;
  return request<API.BaseResponseObject_>(
    `/api/teachingComment/handle/${param0}`,
    {
      method: "GET",
      params: {
        ...queryParams,
      },
      ...(options || {}),
    }
  );
}

/** 获取帖子的所有评论 GET /api/teachingComment/list/${param0} */
export async function getCommentsByPostIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getCommentsByPostIdUsingGETParams,
  options?: { [key: string]: any }
) {
  const { postId: param0, ...queryParams } = params;
  return request<API.BaseResponseListTeachingPostComment_>(
    `/api/teachingComment/list/${param0}`,
    {
      method: "GET",
      params: { ...queryParams },
      ...(options || {}),
    }
  );
}
